#include <iostream>
#include <memory>
#include "Log.hpp"

using namespace LogModule;
int main()
{
    // std::unique_ptr<LogStrategy> log_Console = std::make_unique<ConsoleLogStrategy>(); // C++14
    // std::unique_ptr<LogStrategy> log_File = std::make_unique<FileLogStrategy>(); // C++14

    // log_Console->SyncLog("hello log!");
    // log_File->SyncLog("hello log!");
    Enable_FileLog_Strategy();
    logger(LogLevel::DEBUG) << "hello world " << 9.9999;
    Enable_ConsoleLog_Strategy();
    logger(LogLevel::FATAL) << "fatal " << 3.1415926;

}

// [可读性很好的时间] [⽇志等级] [进程pid] [打印对应⽇志的⽂件名][⾏号] - 消息内容，支持可变参数
// [2024-08-04 12:27:03] [DEBUG] [202938] [main.cc] [16] - hello world
// [2024-08-04 12:27:03] [DEBUG] [202938] [main.cc] [17] - hello world
// [2024-08-04 12:27:03] [DEBUG] [202938] [main.cc] [18] - hello world
// [2024-08-04 12:27:03] [DEBUG] [202938] [main.cc] [20] - hello world
// [2024-08-04 12:27:03] [DEBUG] [202938] [main.cc] [21] - hello world
// [2024-08-04 12:27:03] [WARNING] [202938] [main.cc] [23] - hello world